﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PwdMgrUI.ViewModels
{
    [AttributeUsage(AttributeTargets.Property,
        AllowMultiple = false, Inherited = true)]
    class CommandAttribute : Attribute
    {
        public CommandAttribute(string execFuncName)
            : this(execFuncName, null)
        {
        }

        public CommandAttribute(string execFuncName,
            string canExecFuncName)
        {
            if (string.IsNullOrEmpty(execFuncName))
                throw new ArgumentNullException("execFuncName");

            ExecFuncName = execFuncName;
            CanExecFuncName = canExecFuncName;
        }

        public string ExecFuncName { get; set; }
        public string CanExecFuncName { get; set; }
    }
}
